package com.testDemo.jdk8.stream;

import com.testDemo.jdk8.date.DateTimeUtils;
import org.junit.jupiter.api.Test;

import java.util.Date;
import java.util.Set;
import java.util.TreeSet;

/**
 * @author: zour
 * @date: 2024/6/3
 * @description:
 */
public class SetTest {
    @Test
    public void TreeSetTest(){
        Set<Date> set = new TreeSet<>();
        Date curr = new Date(),emp = null;
        for (int i = 1; i < 10; i++) {
            set.add(DateTimeUtils.addDays(curr,i));
        }
        set.forEach(row-> System.out.println(DateTimeUtils.getDateString(row,"yyyy-MM-dd")));
    }
}
